<div class="guests view">
<h2><?php echo __('Guest'); ?></h2>
	<dl>
		<dt><?php echo __('Id'); ?></dt>
		<dd>
			<?php echo h($guest['Guest']['id']); ?>
			&nbsp;
		</dd>
		<dt><?php echo __('Name'); ?></dt>
		<dd>
			<?php echo h($guest['Guest']['name']); ?>
			&nbsp;
		</dd>
		<dt><?php echo __('Cmt'); ?></dt>
		<dd>
			<?php echo h($guest['Guest']['cmt']); ?>
			&nbsp;
		</dd>
		<dt><?php echo __('Country'); ?></dt>
		<dd>
			<?php echo h($guest['Guest']['country']); ?>
			&nbsp;
		</dd>
		<dt><?php echo __('Job'); ?></dt>
		<dd>
			<?php echo h($guest['Guest']['job']); ?>
			&nbsp;
		</dd>
		<dt><?php echo __('Visa Dat'); ?></dt>
		<dd>
			<?php echo h($guest['Guest']['visa_dat']); ?>
			&nbsp;
		</dd>
		<dt><?php echo __('Phone'); ?></dt>
		<dd>
			<?php echo h($guest['Guest']['phone']); ?>
			&nbsp;
		</dd>
		<dt><?php echo __('Nhapcanh'); ?></dt>
		<dd>
			<?php echo h($guest['Guest']['nhapcanh']); ?>
			&nbsp;
		</dd>
		<dt><?php echo __('Start'); ?></dt>
		<dd>
			<?php echo h($guest['Guest']['start']); ?>
			&nbsp;
		</dd>
		<dt><?php echo __('End'); ?></dt>
		<dd>
			<?php echo h($guest['Guest']['end']); ?>
			&nbsp;
		</dd>
		<dt><?php echo __('Gioitinh'); ?></dt>
		<dd>
			<?php echo h($guest['Guest']['gioitinh']); ?>
			&nbsp;
		</dd>
		<dt><?php echo __('Users'); ?></dt>
		<dd>
			<?php echo $this->Html->link($guest['Users']['name'], array('controller' => 'users', 'action' => 'view', $guest['Users']['id'])); ?>
			&nbsp;
		</dd>
		<dt><?php echo __('Address'); ?></dt>
		<dd>
			<?php echo h($guest['Guest']['address']); ?>
			&nbsp;
		</dd>
		<dt><?php echo __('Visa'); ?></dt>
		<dd>
			<?php echo h($guest['Guest']['visa']); ?>
			&nbsp;
		</dd>
	</dl>
</div>
<div class="actions">
	<h3><?php echo __('Actions'); ?></h3>
	<ul>
		<li><?php echo $this->Html->link(__('Edit Guest'), array('action' => 'edit', $guest['Guest']['id'])); ?> </li>
		<li><?php echo $this->Form->postLink(__('Delete Guest'), array('action' => 'delete', $guest['Guest']['id']), null, __('Are you sure you want to delete # %s?', $guest['Guest']['id'])); ?> </li>
		<li><?php echo $this->Html->link(__('List Guests'), array('action' => 'index')); ?> </li>
		<li><?php echo $this->Html->link(__('New Guest'), array('action' => 'add')); ?> </li>
		<li><?php echo $this->Html->link(__('List Users'), array('controller' => 'users', 'action' => 'index')); ?> </li>
		<li><?php echo $this->Html->link(__('New Users'), array('controller' => 'users', 'action' => 'add')); ?> </li>
		<li><?php echo $this->Html->link(__('List Bills'), array('controller' => 'bills', 'action' => 'index')); ?> </li>
		<li><?php echo $this->Html->link(__('New Bill'), array('controller' => 'bills', 'action' => 'add')); ?> </li>
		<li><?php echo $this->Html->link(__('List Reservations'), array('controller' => 'reservations', 'action' => 'index')); ?> </li>
		<li><?php echo $this->Html->link(__('New Reservation'), array('controller' => 'reservations', 'action' => 'add')); ?> </li>
	</ul>
</div>
<div class="related">
	<h3><?php echo __('Related Bills'); ?></h3>
	<?php if (!empty($guest['Bill'])): ?>
	<table cellpadding = "0" cellspacing = "0">
	<tr>
		<th><?php echo __('Id'); ?></th>
		<th><?php echo __('Start Date'); ?></th>
		<th><?php echo __('End Date'); ?></th>
		<th><?php echo __('Users Id'); ?></th>
		<th><?php echo __('Guest Id'); ?></th>
		<th><?php echo __('Guest'); ?></th>
		<th><?php echo __('Cmt'); ?></th>
		<th><?php echo __('Prepay'); ?></th>
		<th><?php echo __('Sale'); ?></th>
		<th><?php echo __('Orther Money'); ?></th>
		<th><?php echo __('Note'); ?></th>
		<th><?php echo __('Total'); ?></th>
		<th><?php echo __('Status'); ?></th>
		<th><?php echo __('Rooms Id'); ?></th>
		<th><?php echo __('Rooms Retation'); ?></th>
		<th class="actions"><?php echo __('Actions'); ?></th>
	</tr>
	<?php foreach ($guest['Bill'] as $bill): ?>
		<tr>
			<td><?php echo $bill['id']; ?></td>
			<td><?php echo $bill['start_date']; ?></td>
			<td><?php echo $bill['end_date']; ?></td>
			<td><?php echo $bill['users_id']; ?></td>
			<td><?php echo $bill['guest_id']; ?></td>
			<td><?php echo $bill['guest']; ?></td>
			<td><?php echo $bill['cmt']; ?></td>
			<td><?php echo $bill['prepay']; ?></td>
			<td><?php echo $bill['sale']; ?></td>
			<td><?php echo $bill['orther_money']; ?></td>
			<td><?php echo $bill['note']; ?></td>
			<td><?php echo $bill['total']; ?></td>
			<td><?php echo $bill['status']; ?></td>
			<td><?php echo $bill['rooms_id']; ?></td>
			<td><?php echo $bill['rooms_retation']; ?></td>
			<td class="actions">
				<?php echo $this->Html->link(__('View'), array('controller' => 'bills', 'action' => 'view', $bill['id'])); ?>
				<?php echo $this->Html->link(__('Edit'), array('controller' => 'bills', 'action' => 'edit', $bill['id'])); ?>
				<?php echo $this->Form->postLink(__('Delete'), array('controller' => 'bills', 'action' => 'delete', $bill['id']), null, __('Are you sure you want to delete # %s?', $bill['id'])); ?>
			</td>
		</tr>
	<?php endforeach; ?>
	</table>
<?php endif; ?>

	<div class="actions">
		<ul>
			<li><?php echo $this->Html->link(__('New Bill'), array('controller' => 'bills', 'action' => 'add')); ?> </li>
		</ul>
	</div>
</div>
<div class="related">
	<h3><?php echo __('Related Reservations'); ?></h3>
	<?php if (!empty($guest['Reservation'])): ?>
	<table cellpadding = "0" cellspacing = "0">
	<tr>
		<th><?php echo __('Id'); ?></th>
		<th><?php echo __('Users Id'); ?></th>
		<th><?php echo __('Guest Id'); ?></th>
		<th><?php echo __('Rooms Id'); ?></th>
		<th><?php echo __('Start'); ?></th>
		<th><?php echo __('Time Start'); ?></th>
		<th><?php echo __('End'); ?></th>
		<th><?php echo __('Time End'); ?></th>
		<th><?php echo __('Prepay'); ?></th>
		<th><?php echo __('Sale'); ?></th>
		<th><?php echo __('Note'); ?></th>
		<th><?php echo __('Status'); ?></th>
		<th class="actions"><?php echo __('Actions'); ?></th>
	</tr>
	<?php foreach ($guest['Reservation'] as $reservation): ?>
		<tr>
			<td><?php echo $reservation['id']; ?></td>
			<td><?php echo $reservation['users_id']; ?></td>
			<td><?php echo $reservation['guest_id']; ?></td>
			<td><?php echo $reservation['rooms_id']; ?></td>
			<td><?php echo $reservation['start']; ?></td>
			<td><?php echo $reservation['time_start']; ?></td>
			<td><?php echo $reservation['end']; ?></td>
			<td><?php echo $reservation['time_end']; ?></td>
			<td><?php echo $reservation['prepay']; ?></td>
			<td><?php echo $reservation['sale']; ?></td>
			<td><?php echo $reservation['note']; ?></td>
			<td><?php echo $reservation['status']; ?></td>
			<td class="actions">
				<?php echo $this->Html->link(__('View'), array('controller' => 'reservations', 'action' => 'view', $reservation['id'])); ?>
				<?php echo $this->Html->link(__('Edit'), array('controller' => 'reservations', 'action' => 'edit', $reservation['id'])); ?>
				<?php echo $this->Form->postLink(__('Delete'), array('controller' => 'reservations', 'action' => 'delete', $reservation['id']), null, __('Are you sure you want to delete # %s?', $reservation['id'])); ?>
			</td>
		</tr>
	<?php endforeach; ?>
	</table>
<?php endif; ?>

	<div class="actions">
		<ul>
			<li><?php echo $this->Html->link(__('New Reservation'), array('controller' => 'reservations', 'action' => 'add')); ?> </li>
		</ul>
	</div>
</div>
